import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export default new Router({
  mode: 'history', // 使用此模式, 可以解决微信分享的问题, 但是需要配置urlrewrite
  base: '/wx/',
  routes: [
    {
      path: '/',
      component: () => import('@/pages/homeContain.vue'),
      redirect: '/index',
      children: [
        {
          path: '/index',
          name: 'index',
          component: () => import('@/pages/index/index.vue')
        },
        {
          path: '/caruser',
          name: 'caruser',
          component: () => import('@/pages/caruser/caruser.vue')
        },
        {
          path: '/discover',
          name: 'discover',
          component: () => import('@/pages/discover/discover.vue')
        },
        {
          path: '/mine',
          name: 'mine',
          component: () => import('@/pages/mine/mine.vue')
        }
      ]
    },
    {
      path: '/wxcode',
      name: 'wxcode',
      component: () => import('@/pages/wxauth/WxCode.vue')
    },
    { 
      path: '/wxauth',
      name: 'wxauth',
      component: () => import('@/pages/wxauth/WxAuth.vue'),
    },
    {
      path: '/telband',
      name: 'telband',
      component: () => import('@/pages/telband/telBand.vue'),
    },
    {
      path: '/nameinput',
      name: 'nameinput',
      component: () => import('@/pages/nameinput/nameinput.vue'),
    },
    {
      path: '/searchcar',
      name: 'searchcar',
      component: () => import('@/pages/searchcar/searchCar.vue')
    },
    {
      path: '/userconfirm',
      name: 'userconfirm',
      component: () => import('@/pages/userconfirm/userconfirm.vue')
    },
    {
      path: '/confirmsuccess',
      name: 'confirmsuccess',
      component: () => import('@/pages/confirmSuccess/confirmSuccess.vue')
    },
    {
      path: '/driverconfirm',
      name: 'driverconfirm',
      component: () => import('@/pages/driverconfirm/driverconfirm.vue')
    },
    {
      path: '/drivercardconfirm',
      name: 'drivercardconfirm',
      component: () => import('@/pages/drivercardconfirm/drivercardconfirm.vue')
    },
    {
      path: '/orders',
      name: 'orders',
      component: () => import('@/pages/orders/orders.vue')
    },
    {
      path: '/ordercar',
      name: 'ordercar',
      component: () => import('@/pages/ordercar/ordercar.vue')
    },
    {
      path: '/updatetel',
      name: 'updatetel',
      component: () => import('@/pages/updatetel/updatetel.vue')
    },
    {
      path: '/updatename',
      name: 'updatename',
      component: () => import('@/pages/updatename/updatename.vue')
    },
    {
      path: '/myroute',
      name: 'myroute',
      component: () => import('@/pages/myroute/myroute.vue')
    },
    {
      path: '/city',
      name: 'city',
      component: () => import('@/pages/city/city.vue')
    },
    {
      path: '/article',
      name: 'article',
      component: () => import('@/pages/article/article.vue')
    },
    {
      path: '/publishInfo',
      name: 'publishInfo',
      component: () => import('@/pages/publishInfo/publishInfo.vue')
    },
    {
      path: '/orderInfo',
      name: 'orderInfo',
      component: () => import('@/pages/orderInfo/orderInfo.vue')
    },
    {
      path: '/payinfo',
      name: 'payinfo',
      component: () => import('@/pages/payinfo/payinfo.vue')
    },
    {
      path: '/location',
      name: 'location',
      component: () => import('@/pages/location/location.vue')
    },
    {
      path: '/help',
      name: 'help',
      component: () => import('@/pages/help/help.vue')
    },
    {
      path: '/kefu',
      name: 'kefu',
      component: () => import('@/pages/kefu/kefu.vue')
    },
    {
      path: '/helpArticle',
      name: 'helpArticle',
      component: () => import('@/pages/help/article.vue')
    },
    {
      path: '/updatePublish',
      name: 'updatePublish',
      component: () => import('@/pages/updatePublish/updatePublish.vue')
    },
    {
      path: '/nocarorder',
      name: 'nocarorder',
      component: () => import('@/pages/nocarorder/nocarorder.vue')
    },
    {
      path: '/nocarorderupdate',
      name: 'nocarorderupdate',
      component: () => import('@/pages/nocarorderupdate/nocarorderupdate.vue')
    }
  ]
})